package com.qingke.Imp;

import com.saozhu.Dao.DataBase;
import com.saozhu.command.CustomerCommand;
import com.saozhu.pojo.Customer;
import com.saozhu.pojo.Good;
import com.saozhu.utils.Console;

public class CustomerNewOrderCommand extends CustomerCommand{

	public CustomerNewOrderCommand(Customer customer) {
		super(customer);
	}

	@Override
	public void execute() {

		String name = Console.askUserInput("please choose goods by name ");
		int num = Console.setInput("please print goods number");
		Good good = DataBase.getInstance().selectGood(name);
		
//		customer.setId(1);
//		customer.setReceive(new ReceivceInformation());
//		customer.getReceive().setId(1);
		DataBase.getInstance().newOrder(customer,num,good);
		//Console.println(good);
		
	}

}
